{{useCss '/app-pages/css/main.scss',['/main/*','/main.html']}}
{{#include '/app-pages/pages/public/top.html'}}

<div class="body">
  <div class="list-menu">
		<div class="box">
    	<div class="menu icon-th" data="preview" title="预览" event-click="{{'$Event.main.change_list_type'}}"></div>
    	<div class="menu icon-th-list" title="列表" data='list' event-click="{{'$Event.main.change_list_type'}}"></div>
		</div>
		<div class="box no-border">
			<div class="menu" onclick="javascript: document.getElementById('file').click()">上传</div>
			<div class="menu">下载</div>
			<input type="file" style="display: none" name="file" id="file" event-change="{{'$Event.main.upload'}}" />
		</div>
  </div>


	{{#teleporter 'main'}}
</div>

<script type="text/vm">
function(vm) {
	Path.registerjSouperRoute("/main/:main_page?", function(loc) {
		var _emit_lock = true;
		var admin_page = this.params.main_page;
		//console.log(main_page);
		return ({
			stop_emit:true,//因为是2级路由，事件已经出发过了，阻止事件再次捕获触发
			href: loc.href,
			html: "/app-pages/pages/main/",
			js: "/app-pages/js/main/",
			css: "/app-pages/css/main/",
			prefix: "/main/", //URL-pathname中无用的前缀部分，用来过滤href得出pagename
			tel: "main",
			default: "index",
			pagename_handler: function(pagename) { //过滤出来的pagename在这里处理·二次处理pagename
				//过滤掉后缀
				return jSouper.$.lst(pagename, ".") || pagename;
			},
			index: 1,
			vm: vm
		});
	});
}
</script>
